package com.yizhi.service.Impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.yizhi.domain.dto.EvaluationManageDTO;
import com.yizhi.domain.entityDO.EvaluationManageDO;
import com.yizhi.domain.vo.EvaluationManageVO;
import com.yizhi.mapper.EvaluationManageMapper;
import com.yizhi.service.IEvaluationManageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yizhi.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 留言表 服务实现类
 * </p>
 *
 * @author zhouyihe
 * @since 2024-04-16
 */
@Service
public class EvaluationManageServiceImpl extends ServiceImpl<EvaluationManageMapper, EvaluationManageDO> implements IEvaluationManageService {
    @Autowired
    private EvaluationManageMapper evaluationManageMapper;
    
    @Override
    public PageResult pageQuery(EvaluationManageDTO evaluationManageDTO) {
        PageHelper.startPage(evaluationManageDTO.getPage(),evaluationManageDTO.getPageSize());
        Page<EvaluationManageVO> page = evaluationManageMapper.pageQuery(evaluationManageDTO);
        return new PageResult(page.getResult(),page.getTotal());
    }
}
